import pysoem

master = pysoem.Master()

master.open('enp3s0')

if master.config_init() > 0:
    print('device found:')
    for idx, slave in enumerate(master.slaves):
        print(slave.name, "position:", idx)
else:
    print('no device found')

master.close()